{extend name='user/public/layout' /}
{block name='content'}
<style>
    .dingdan_box{ margin-left:auto; margin-right:auto;  overflow:hidden;}
    .xfdd_title{ background-color:#f8f8f8; height:30px; margin-top:10px;}
    .xfdd_text{ font-size:14px; float:left; margin-left:10px; line-height:30px;}
    .xfdd_shijian{ float:right; margin-right:10px; line-height:30px;}

    .xinfang_dingdan{border-bottom:solid 1px #efefef ; overflow:hidden;}
    .xinfang_dingdan img{ height:110px; width:120px; margin:10px; float:left;}
    .loupan{ float:left;margin-top:10px; height:110px; width:380px; }
    .loupan a{ font-size:14px; color:#21A6D3;}
    .loupan a:hover,.loupan a:hover p{color:#21A6D3;text-decoration: underline}
    .fuwufei{width:160px; margin: auto;float: left;margin-top:40px; }
    .zhuangk li{font-size:14px; text-align:center;}
    .fuwufei li{font-size:14px; text-align:center;}
    .xiangq{ float:right; margin-right:30px;  margin-top:50px;}
    .xiangq a{ color:#21A6D3; font-size:14px;}
    .xiangq a:hover{text-decoration:underline;}

</style>
<div class="overflow_h">
    <div class="screen">
        <div class="screen_box01 overflow_h">
            <ul>
                <li><a href="{:url('user.collection/index')}" class="on">关注列表</a></li>
            </ul>
        </div>
    </div>
    <div class="user-nav">
        {volist name="lists" id='vo' empty='暂无数据'}
        <div class="dingdan_box">
            <div class="xfdd_title">
                <span class="xfdd_text">{$vo.house.title}</span>
                <span class="xfdd_shijian">关注时间：{$vo.create_time|date='Y-m-d H:i:s',###}</span>
            </div>
            <div class="xinfang_dingdan">
                <ul>
                    <li><a target="_blank" href="{:url('Loupan/detail',['id'=>$vo['house_id']])}"><img src="{$vo.house.img}"></a></li>
                    <li class="loupan"><a target="_blank" href="{:url('Loupan/detail',['id'=>$vo['house_id']])}">
                        <p>{$vo.house.title}</p>
                        {$vo.house['youhui']}</a></li>
                    <li class="fuwufei">
                        <ul>
                            <li>均价</li><li>{$vo.house.average_price}元/平米</li>
                        </ul>
                    </li>
                    <li class="xiangq">
                        <a href="javascript:;" class="J_del" data-uri="{:url('user.collection/delete',['id'=>$vo['id']])}">取消</a>
                    </li>
                </ul>
            </div>
        </div>
        {/volist}
        <div class="plastic_bottom_pages">
            {$pages}
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
    $(function(){
        $('.J_del').bind('click',function(){
            if(confirm('您确定要取消关注么？')){
                $.get($(this).data('uri'),function(res){
                    if(res.status == 1){
                        layer.msg(res.msg,{icon:1});
                        setTimeout(function(){window.location.reload();},2000);
                    }else{
                        layer.msg(res.msg,{icon:2});
                    }
                });
            }
        });
    });
</script>
{/block}